package com.ncr.teradata.bireport;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * ReportWebService.java
 * 报表工具Web服务类
 * 根据报表视图配置元数据生成报表视图
 *
 * @author ylpeng
 * @date Oct 25, 2007
 */
public class ReportWebService extends HttpServlet 
{
	ReportServer rserver = ReportServer.getInstance();
	
	public void service(HttpServletRequest request,HttpServletResponse response){
		response.setContentType("text/html");
		response.setCharacterEncoding("UTF-8");
		
		ReportViewMetadata rptView = null;
		String viewid = request.getParameter("viewid");
		if (viewid != null)
			rptView = rserver.getReportViewMetadata(viewid);
		
		try{
			java.io.PrintWriter out = response.getWriter();
			if (rptView == null){
				out.write("您请求的视图不存在！");
			}
			else{
				
			}
		}
		catch(Exception e){
			e.printStackTrace();
		}
	}
	
	/**
	 * 向控制台输出消息
	 *
	 *@param msg String 消息内容
	 */
	private void trace(String msg){
		System.out.println("[ReportWebService]::" + msg);
	}
}
